<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ include file="../../head/head.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script type="text/javascript"
	src="<%=path%>/resource/js/jquery/1.6.2/jquery-1.6.2.min.js">
</script>
<script type="text/javascript"
	src="<%=path%>/resource/js/jquery-easyui-1.3.3/jquery.cookie.js">
</script>
<link id="easyuiTheme" rel="stylesheet" type="text/css"
			href="<%=path%>/resource/js/jquery-easyui-1.3.3/themes/theme.css"/>
<link rel="stylesheet" type="text/css"
	href="<%=path%>/resource/js/jquery-easyui-1.3.3/themes/icon.css"></link>
<script type="text/javascript"		
	src="<%=path%>/resource/js/jquery-easyui-1.3.3/jquery.easyui.min.js">
</script>
<script type="text/javascript" charset="UTF-8"
	src="<%=path%>/resource/js/jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js">
</script>
<script type="text/javascript" src="<%=path%>/js/jquery/jquery.form.js">
</script>
<!-- INDEX.JS -->
<script type="text/javascript"
	src="<%=path%>/page/sys/employee/employee.js"> </script>
<link rel="StyleSheet" href="<%=path%>/resource/js/dtree/dtree.css"
	type="text/css" />
<script type="text/javascript"
	src="<%=path%>/resource/js/dtree/dtree.js"></script>

<script type="text/javascript">
		$(document).ready(function() {
			//总面板的宽和高
			$("#cc").css("width", $(window).width() - 24);
			$("#cc").css("height", $(window).height() - 20);
			$("#center").css("width", $(window).width() - 206);
			$("#center").css("height", $(window).height() - 50);
			$("#west").css("height", $(window).height() - 50);
			
		});
	</script>
</head>
<body>
<input type="hidden" value="" id="departId" name="employeeBean.departmentId">

<!-- 总面板开始 -->
<div id="cc" class="easyui-layout">
<div id="west"
	data-options="region:'west',collapsible:false,title:'部门树'"
	style="width: 200px;">
<ul id="ttt" style="float: left; width: 100px;">
</ul>
</div>
<div id="center" data-options="region:'center',title:'员工信息'"><!-- 按钮和查询栏开始 -->
<div id="tb" style="padding: 5px; height: auto"><!-- 按钮区开始 -->
<form action="" id="findForm" method="post">
<div style="margin-bottom: 5px"><a href="#"
	class="easyui-linkbutton" iconCls="icon-add" plain="true"
	onclick="toAddEmployee()">新增</a> <a href="#" class="easyui-linkbutton"
	iconCls="icon-edit" plain="true" onclick="toUpdateEmployee()">修改</a> <a
	href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true"
	onclick="doDeleteEmployee()">删除</a><a href="#" class="easyui-linkbutton" iconCls="icon-add"
	plain="true" onclick="toImport()">批量导入</a></div>
<!-- 按钮区结束 --> 
	<!-- 查询区开始 -->
		
				<div>
					姓名：<input type="text" name="employeeBean.keyName"  style="width:90px"/>
					学/工号: <input type="text" name="employeeBean.jobNo" style="width:90px"></input>
					电话号码: <input type="text" name="employeeBean.telephone" style="width:90px"></input>
					<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-search'" onclick="toQuery()">查询</a>
				</div>
				<!-- 查询区结束 -->
		</form>
</div>

<!-- 按钮和查询栏结束 --> 
<!-- 列表开始 -->
<table id="departmentList"></table>
<!-- 列表结束 --></div>
</div>
<!-- 总面板结束 -->

<!--新增开始-->
<div id="addEmployeeList" class="easyui-dialog"
			style="width: 630px; height: 318px;"
			data-options="title:'新增',modal:true,closed:true">
	    <form id="addform" method="post">
			<table style="width: 100%;height: 100%; text-align:center;" border="0">
				<tr>
					<td width="20%"><span style="color: red">*</span>姓名</td>
					<td width="30%" align="left"><input class="easyui-validatebox" type="text" id="keyName" name="employeeBean.keyName" data-options="required:true"></input></td>
					<td><span style="color: red">*</span>学/工号</td>
					<td align="left"><input class="easyui-validatebox" type='text' id="jobNo" name="employeeBean.jobNo" data-options="required:true"/></td>
				</tr>
				<tr>
					<td><span style="color: red">*</span>手机号</td>
					<td align="left"><input class="easyui-validatebox" maxlength="11" type="text" id="telephone" name="employeeBean.telephone" data-options="required:true" validType="phone" /></td>
					<td>性别</td>
					<td align="left">
						<select name='employeeBean.sex' id='sex' style="width: 155px;">
							<option value="0" selected="selected">男</option>
							<option value="1">女</option>
						</select>
					</td>
				</tr>
				<tr>
					<td>职务</td>
					<td align="left"><input class="easyui-validatebox" type='text' id="post" name="employeeBean.post"/></td>
					<td>生日</td>
					<td align="left"><input class="easyui-datebox" type='text' id="birthday" name="employeeBean.birthday"/></td>
				</tr>
				<tr>
					<td>证件类型</td>
					<td align="left">
						<select name='employeeBean.documentType' id='documentType' style="width: 155px;" onchange="changeDocumentType();">
							<option value="">--请选择--</option>
						</select>
					</td>
					<td width="20%">证件号</td>
					<td width="30%" align="left"><input type="text" id="documentNo" name="employeeBean.documentNo" disabled="disabled"></input></td>
				</tr>				
				<tr>
					<td>民族</td>
					<td align="left">
						<select name='employeeBean.familyName' id='familyName' style="width: 155px;">
							<option value="">--请选择--</option>
						</select>
					</td>
					<td>地址</td>
					<td align="left"><input class="easyui-validatebox" type="text" id="userAddress" name="employeeBean.userAddress" ></input></td>
				</tr>
				<tr>
					<td width="20%">登录名</td>
					<td width="30%" align="left"><input type="text" id="loginID" name="employeeBean.loginID"></input></td>
					<td>登录密码</td>
					<td align="left"><input class="easyui-validatebox" type="password" id="password" name="employeeBean.password" ></input></td>
				</tr>
				<tr>
					<td width="20%">消费密码</td>
					<td width="30%" align="left"><input type="password" id="consume_pwd" name="employeeBean.consumepwd"></input></td>
					<td>每餐最大额度（分）</td>
					<td align="left"><input class="easyui-validatebox" type="text" id="mcmaxedu" name="employeeBean.mcmaxedu" validType="number"></input></td>
				</tr>
				<tr>
					<td>每日最大额度（分）</td>
					<td align="left"><input class="easyui-validatebox"  type="text" id="mrmaxedu" name="employeeBean.mrmaxedu" validType="number"></input></td>
					<td>每餐提醒额度（分）</td>
					<td align="left"><input class="easyui-validatebox" type="text" id="mctxedu" name="employeeBean.mctxedu" validType="number"></input></td>
					</tr>
				<tr>
					<td>每日提醒额度（分）</td>
					<td align="left"><input class="easyui-validatebox" type="text" id="mrtxedu" name="employeeBean.mrtxedu" validType="number"></input></td>
					<td>余额提醒额度（分）</td>
					<td align="left"><input class="easyui-validatebox" type="text" id="balancetx" name="employeeBean.balancetx" validType="number"></input></td>
				</tr>
				<tr>
					<td colspan="4" align="right" style="padding-top: 13px;">
						<a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="doAddEmployeeList();">保存</a>
						<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-reload'" id="reset" onclick="clearForm();">刷新</a>
						<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-cancel'" onclick="closeDialog();">关闭</a>
					</td>
				</tr>
			</table>
		</form>
</div>
<!--新增结束-->

<!--修改开始-->
<div id="updateEmployeeList" class="easyui-dialog"
			style="width: 630px; height: 318px;"
			data-options="title:'修改',modal:true,closed:true">
	    <form id="updateform" method="post">
	    	<input type="hidden" id="update_id" name="employeeBean.id" />
			<table style="width: 100%;height: 100%; text-align:center;" border="0">
				<tr>
					<td width="20%"><span style="color: red">*</span>姓名</td>
					<td width="30%" align="left"><input class="easyui-validatebox" type="text" id="update_keyName" name="employeeBean.keyName" data-options="required:true"></input></td>
					<td><span style="color: red">*</span>学/工号</td>
					<td align="left"><input class="easyui-validatebox" type='text' id="update_jobNo" name="employeeBean.jobNo" data-options="required:true"/></td>
				</tr>
				<tr>
					<td><span style="color: red">*</span>手机号</td>
					<td align="left"><input class="easyui-validatebox" maxlength="11" type="text" id="update_telephone" name="employeeBean.telephone" data-options="required:true" validType="phone"></input></td>
					<td>性别</td>
					<td align="left">
						<select name='employeeBean.sex' id='update_sex' style="width: 155px;">
							<option value="0" selected="selected">男</option>
							<option value="1">女</option>
						</select>
					</td>
				</tr>
				<tr>
					<td>职务</td>
					<td align="left"><input class="easyui-validatebox" type='text' id="update_post" name="employeeBean.post"/></td>
					<td>生日</td>
					<td align="left"><input class="easyui-datebox" type='text' id="update_birthday" name="employeeBean.birthday"/></td>
				</tr>
				<tr>
					<td>证件类型</td>
					<td align="left">
						<select name='employeeBean.documentType' id='update_documentType' style="width: 155px;" onChange="changeDocumentType();" >
							<option value="">--请选择--</option>
						</select>
					</td>
					<td width="20%">证件号</td>
					<td width="30%" align="left"><input type="text" id="update_documentNo" name="employeeBean.documentNo" disabled="disabled"></input></td>
				</tr>				
				<tr>
					<td>民族</td>
					<td align="left">
						<select name='employeeBean.familyName' id='update_familyName' style="width: 155px;">
							<option value="">--请选择--</option>
						</select>
					</td>
					<td>地址</td>
					<td align="left"><input class="easyui-validatebox" type="text" id="update_userAddress" name="employeeBean.userAddress" ></input></td>
				</tr>
				<tr>
					<td width="20%">登录名</td>
					<td width="30%" align="left"><input type="text" id="update_loginID" name="employeeBean.loginID"></input></td>
					<td>登录密码</td>
					<td align="left"><input class="easyui-validatebox" type="password" id="update_password" name="employeeBean.password" ></input></td>
				</tr>
				<tr>
					<td width="20%">消费密码</td>
					<td width="30%" align="left"><input type="password" id="update_consume_pwd" name="employeeBean.consumepwd"></input></td>
					<td>每餐最大额度（分）</td>
					<td align="left"><input class="easyui-validatebox" type="text" id="update_mcmaxedu" name="employeeBean.mcmaxedu" validType="number"></input></td>
				</tr>
				<tr>
					<td>每日最大额度（分）</td>
					<td align="left"><input class="easyui-validatebox"  type="text" id="update_mrmaxedu" name="employeeBean.mrmaxedu" validType="number"></input></td>
					<td>每餐提醒额度（分）</td>
					<td align="left"><input class="easyui-validatebox" type="text" id="update_mctxedu" name="employeeBean.mctxedu" validType="number"></input></td>
					</tr>
				<tr>
					<td>每日提醒额度（分）</td>
					<td align="left"><input class="easyui-validatebox" type="text" id="update_mrtxedu" name="employeeBean.mrtxedu" validType="number"></input></td>
					<td>余额提醒额度（分）</td>
					<td align="left"><input class="easyui-validatebox" type="text" id="update_balancetx" name="employeeBean.balancetx" validType="number"></input></td>
				</tr>
				<tr>
					<td colspan="4" align="right" style="padding-top: 13px;">
						<a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="doUpdateEmployee();">保存</a>
						<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-reload'" id="reset" onclick="clearForm();">刷新</a>
						<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-cancel'" onclick="closeUpdateDialog();">关闭</a>
					</td>
				</tr>
			</table>
		</form>
</div>
<!--修改结束-->

<!-- 批量导入start -->
<div id="regBatchDetail" class="easyui-dialog"
			style="width: 330px; height: 125px;"
			data-options="title:'批量导入',modal:true,closed:true">
			<form id="addBatchForm" method="post" enctype="multipart/form-data">
				
				<table style="width: 100%;height: 100%; text-align:center;" border="0">
				<tr>
					<td width="20%">选择文件：</td>
					<td width="30%" align="left">
						<s:file id="import_fiel" name="regImport"></s:file>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<div id="upMessage" style="color: red"></div>
					</td>
				</tr>
				<tr>
					<td colspan="4" align="right" style="padding-top: 13px;">
					
						<input type="submit" class="table1_import"
											id="regBatchKeyCard" value="导入" />
						<input type="button" class="table1_export"
											id="downloadBatchFormwork" value="模板下载" />
<!--						<a href="#" class="easyui-linkbutton" id="regBatchKeyCard" iconCls="icon-save" plain="true" onclick="regBlackList();">导入</a>-->
<!--						<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-reload'" id="downloadBatchFormwork" onclick="downloadBatchFormwork();">模版下载</a>-->
					</td>
				</tr>
				</table>
			</form>
		</div>
		<!-- 批量导入end -->
		<div class="ext-el-mask" style="display: none; z-index: 900;"></div>

</body>
</html>